package com.test.javafaq_search.repository;

import com.test.javafaq_search.vo.Item;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

public interface ItemRepository extends ElasticsearchRepository<Item,Long> {

    Iterable<Item> queryItemsByTitleMatches(String title);

    Iterable<Item> queryItemsByTitleMatchesAndBrandMatches(String title,String brand);
    Page<Item> queryItemsByTitleMatchesOrBrandMatchesOrderByPriceAsc(String title, String brand ,Pageable pageable);


}
